libxl: Do not trust backend for vusb
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 5 May 2016 15:17:26 +0000 (16:17 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:29 +0000 (15:53 +0100)
commit2538aaa238aef15ade4e8a77db84691aea265693
tree786bce4ec734e5f5028caca0614cc85cf0300ac7
parent4f79473898bad5b311646b3a64e9892cd2993099
libxl: Do not trust backend for vusb

Read the type from /libxl, rather than the backend.  (We still trust
the backend for details such as the number of ports, etc.; these are
not a security problem.)

In getinfo, use the computed frontend path, and the incoming domid,
rather than needlessly reading these values from the backend.

This is part of XSA-178.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
---
v2: New patch following rebase.
tools/libxl/libxl_pvusb.c